package com.mbc.hr.manager;

import java.util.List;

import com.mbc.common.manager.AbstractMgr;
import com.mbc.hr.entities.EmploymentType;

public class EmploymentTypeMgr extends AbstractMgr {
	public EmploymentTypeMgr(){}
	
	public EmploymentTypeMgr(String sessionId){
		this.sessionId = sessionId;
	}
	
	public List<EmploymentType> getAllEmploymentType()throws Exception{
		openConnection();
		try {
			return entityManager.createNamedQuery("EmploymentType.findAll", EmploymentType.class).getResultList();
		} catch (Exception e) {
			throw e;
		} finally {
			closeConnection();
		}
	}
}
